package com.itkang.spi;

import java.util.ServiceLoader;

/**
 * <p>
 * 场景:
 * </p>
 *
 * @author york yuan
 * @version 1.0
 * @since 15/7/3下午2:46
 */
public class Main {
    public static void main(String[] args) {
        //指定serviceloader,
        ServiceLoader<SpiBean> loader = ServiceLoader.load(SpiBean.class);
        for (SpiBean service : loader) {
            service.test();
        }
    }
}
